package cn.com.kisen.db.mongo;

import java.util.ArrayList;
import java.util.List;

/**
 * Hello world!
 *
 */
public class App
{
    public static void main( String[] args ) throws Exception
    {
        try{
            InsertThread a = new InsertThread("a");
            InsertThread b = new InsertThread("b");
            InsertThread c = new InsertThread("c");
            InsertThread d = new InsertThread("d");
            InsertThread e = new InsertThread("e");
            InsertThread f = new InsertThread("f");
            InsertThread g = new InsertThread("g");
            List<Thread> threads = new ArrayList<Thread>();
            threads.add(new Thread(a, "批量插入线程1"));
            threads.add(new Thread(b, "批量插入线程2"));
            threads.add(new Thread(c, "批量插入线程3"));
            threads.add(new Thread(d, "批量插入线程4"));
            threads.add(new Thread(e, "批量插入线程5"));
            threads.add(new Thread(f, "批量插入线程6"));
            threads.add(new Thread(g, "批量插入线程7"));
            for(Thread thread:threads){
                thread.start();
            }
        }catch(Exception e){
            System.err.println(e.getClass().getName()+
                    " : "+
                    e.getMessage());
        }
        /*IndividualInsert ii = IndividualInsert.getInstance();
        ii.batchInsertOneDay();*/
        /*RoughInsert ri = RoughInsert.getInstance();
        ri.compress("2016-04-12");*/
    }
}
